using System;

namespace DanielVaughan.UserOptionsModel
{
	public class OptionCategory : IOptionCategory
	{
		readonly Func<object> titleFunc;
		public object Id { get; private set; }

		public OptionCategory(object id, Func<object> titleFunc)
		{
			Id = ArgumentValidator.AssertNotNull(id, "id");
			this.titleFunc = ArgumentValidator.AssertNotNull(titleFunc, "titleFunc");
		}

		public object Title
		{
			get
			{
				return titleFunc();
			}
		}
	}
}